// 拼接HTTPUrl
function url(type, pathname) {
  return window.RPConfig[type] + pathname;
}

const addressGroupApi = {
  createInfo: params => {
    return $http.post(url('itShare', '/itsReceiverGroup/insert'), params);
  },
  editInfo: params => {
    return $http.post(url('itShare', '/itsReceiverGroup/update'), params);
  },
  getDetail: params => {
    return $http.get(url('itShare', `/itsReceiverGroup/getById?id=${params.id}`));
  },
  getTableList: params => {
    return $http.post(url('itShare', '/itsReceiverGroup/page'), params);
  },
  deleteInfo: params => {
    return $http.post(url('itShare', '/itsReceiverGroup/delete'), params.data);
  },
};

export default addressGroupApi;
